﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;


namespace MvcCodefirstDemo.Models
{
    public class Student:Person
    {
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime EnrollmentDate { get; set; }

        /// <summary>
        /// 导航属性，Student一对多Enrollment，所以导航属性是集合
        /// </summary>
        public virtual ICollection<Enrollment> Enrollments { get; set; }
    }
}